package com.hl.card.pay.util;

import com.hl.card.pay.config.Constant;

import java.util.ArrayList;
import java.util.List;

public class PayTool {

    /**
     * 检测 支付类型
     * @param chanelId
     * @return
     */
    public static String checkChannel(String chanelId){

        String[] channels={"WX_JSAPI","WX_NATIVE","WX_APP","WX_MWEB",
                "IAP","ALIPAY_MOBILE","ALIPAY_PC","ALIPAY_WAP",
                "ALIPAY_QR","UNION_PC","UNION_WAP","HL_BIDOU_EXCHANGE_HTL","HL_AWARD",
                "HL_AWARD_HTL","HL_HTL_RECHARGE","HL_ETH_RECHARGE", "HL_HTL_WITHDRAW",
                "HL_HTL_PAY", "HL_ETH_PAY", "HL_HTL_ASYN_PAY","HUICHAO_WAP", "WX","ALIPAY","UNION","HL"
        };

        List<String> type1List=new ArrayList<>();
        //银联
        type1List.add("UNION_PC");
        List<String> type2List=new ArrayList<>();
        //支付宝
        type2List.add("ALIPAY_PC");
        type2List.add("ALIPAY_WAP");
        //微信
        type2List.add("WX_JSAPI");
        type2List.add("WX_NATIVE");
        type2List.add("WX_APP");
        type2List.add("WX_MWEB");
        //内部支付
        List<String> type3List=new ArrayList<>();
        type3List.add("HL_HTL_PAY");
        type3List.add("HL_ETH_PAY");
        type3List.add("HL_HTL_ASYN_PAY");

        //非支付
        List<String> type4List=new ArrayList<>();//提币
        type4List.add("HL_HTL_WITHDRAW");
        type4List.add("HL_ETH_WITHDRAW");

        List<String> type5List=new ArrayList<>();
        type5List.add("HL_AWARD_HTL");
        type5List.add("HL_HTL_RECHARGE");
        type5List.add("HL");
        type5List.add("HL_BIDOU_EXCHANGE_HTL");
        type5List.add("HL_AWARD");

        if(type1List.contains(chanelId)){
            return Constant.channelType1;
        }else if(type2List.contains(chanelId)){
            return Constant.channelType2;
        }else if(type3List.contains(chanelId)){
            return Constant.channelType3;
        }else if(type4List.contains(chanelId)){
            return Constant.channelType4;
        }


        return "";
    }






}
